<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script src="./js/utils.js"></script>
    <script>
        // 封装一个16进制的颜色
        // document.body.style.background = '#9b1c3c'
        var str = '0123456789abcdef';
        var color = '#';
        for(var i=0;i<6;i++){
            //   console.log(str[randomNum(0, 15)]);
            color += str[randomNum(0,15)] ;
        }
        document.body.style.background = color;
        console.log(color);
        
    </script>
</body>
</html>